package com.visikard.ui.activity;

import android.os.Bundle;
import android.os.Message;
import android.view.View;
import android.view.Window;

import com.visikard.application.VKRegApplication;
import com.visikard.system.Device;
import com.visikard.ui.R;

public class SplashScreen extends BaseFragmentActivity {

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.startup_intro);

		View content = getWindow().findViewById(Window.ID_ANDROID_CONTENT);
		VKRegApplication.screenVisibleHeight = content.getHeight();

		new Device(this);

		mHandler.postDelayed(new SplashRunnable(), 1000);
	}

	private class SplashRunnable implements Runnable {
		@Override
		public void run() {
			navigateTo(MerchantLoginActivity.class);
			// overridePendingTransition(R.anim.anim_slide_in_from_right, R.anim.anim_slide_out_from_right);
			finish();
		}
	}

	// Handle message method
	@Override
	protected boolean handleMessage(Message msg) {
		return super.handleMessage(msg);
	}
}